package com.mallcloud.mall.mall.api.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Optional;

@ApiModel(value="ProRedeemItemBack",description="积分兑换商品回滚过程对象")
@Data
@ToString
public class ProRedeemItemBack {

	@ApiModelProperty(value="传入原单据编号")
	private String billNo;
	
	@ApiModelProperty(value="传出 返回执行编码",hidden=true)
	private Integer messageId;
	@ApiModelProperty(value="传出 返回提示信息",hidden=true)
	private String message;

	public boolean isSuccess() {
		return Optional.ofNullable(this.messageId).map(x -> x.equals(0)).orElse(false);
	}
}
